<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <!--理想视口也一定要写  -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>购物车</title>
    <!-- 引入mui的框架，是最接近原生Api的高性能前端框架,一般做项目先引入没有压缩过的，我们需要查看 -->
    <link rel="stylesheet" href="assets/mui/css/mui.css">
    <!--另一个字体图标 -->
    <link rel="stylesheet" href="assets/fontAwesome/css/font-awesome.css">
    <!-- 一样的代码写一起--共用代码 -->
    <!--   <link rel="stylesheet" href="css/common.css"> -->
    <!--我们自己的css  -->
    <link rel="stylesheet" href="css/cart.css">

</head>

<body>
    <!-- 头部 ,因为这里引入了第三方的框架，所以都需要写前缀，以避免跟框架里面的命名冲突-->
    <header class="lt_header">
        <h4 class="lt_title">
            购物车
            <a class="lt_h_left" href="#">
                <span class="fa fa-arrow-left"></span>
           </a>
            <a class="lt_h_right" href="#">
                <span class="fa fa-refresh"></span>
           </a>
        </h4>
    </header>
    <!-- 内容,容器 -->
    <div class="lt_container">
        <!--下拉刷新容器-->
        <div id="refreshContainer" class="mui-content mui-scroll-wrapper">
            <div class="mui-scroll">
                <ul id="OA_task_2" class="mui-table-view">
                    <!-- <li class="mui-table-view-cell mui-transitioning">
                <div class="mui-slider-right mui-disabled">
                    <a class="mui-btn mui-btn-primary" style="transform: translate(0px, 0px);">编辑</a>
                    <a class="mui-btn mui-btn-red " style="transform: translate(-88px, 0px);">删除</a>
                </div>
                <div class="mui-slider-handle" style="transform: translate(0px, 0px);">
                    <div class="mui-table-cell">
                        <div class="lt_cart_s mui-clearfix">
                            <div class="cart_left">
                                <img src="./images/product.jpg" alt="">
                                <input type="checkbox" class="cl_check">
                            </div>
                            <div class="cart_right">
                                <div class="cart_font">
                                     匡威三星标1970s converse复刻 142334c 144757c三星标黑色高帮
                                </div>
                                <div class="cart_content mui-clearfix">
                                    <div class="cc_price_s mui-pull-left">
                                        <span class="new_price">￥499.1</span>
                                        <span class="old_price">￥888.1</span>
                                    </div>
                                    <div class="cc_num mui-pull-right">x1双</div>
                                </div>
                                <div class="cart_size">鞋码:50</div>
                            </div>
                        </div>
                    </div>
                </div>
            </li> -->
                </ul>

            </div>
        </div>
    </div>
    <div class="lt_zje mui-clearfix">
        <div class="lt_dingd">
            订单总额:￥0.00
        </div>
        <button class="dd_btn">
            生成订单
        </button>
    </div>
    <!-- 底部 -->
    <footer class="lt_footer mui-clearfix">
        <a href="/mobile/index.html">
            <span class="fa fa-home"></span>
                                <p>首页</p>
                                </a>
        <a href="/mobile/category.html">
            <span class="mui-icon mui-icon-bars"></span>
            <p>分类</p>
        </a>
        <a class="active" href="/mobile/cart.html">
            <span class="fa fa-shopping-cart"></span>
            <p>购物车</p>
        </a>
        <a href="/mobile/user/index.html">
            <span class="fa fa-user"></span>
            <p>会员中心</p>
        </a>
    </footer>
</body>

</html>
<!--使用模板引擎渲染页面，引入模板  -->
<script src="assets/artTemplate/template.js"></script>
<!-- 查询数据渲染整个模板 -->
<script type="text/html" id="lt_tl">
    <!--因为有多个，循环得到 每一项数据  -->
    {{ each data as value}}
    <li data-obj="{{objToJson(value)}}" class="mui-table-view-cell mui-transitioning">
        <div class="mui-slider-right mui-disabled">
            <a class="mui-btn editBtn mui-btn-primary" style="transform: translate(0px, 0px);">编辑</a>
            <a class="mui-btn deleteBtn mui-btn-red " style="transform: translate(-88px, 0px);">删除</a>
        </div>
        <div class="mui-slider-handle" style="transform: translate(0px, 0px);">
            <div class="mui-table-cell">
                <div class="lt_cart_s mui-clearfix">
                    <div class="cart_left">
                        <img src="./images/product.jpg" alt="">
                        <input type="checkbox" class="cl_check">
                    </div>
                    <div class="cart_right">
                        <div class="cart_font">
                            {{value.proName}}
                        </div>
                        <div class="cart_content mui-clearfix">
                            <div class="cc_price_s mui-pull-left">
                                <span class="new_price">￥{{value.price}}</span>
                                <span class="old_price">￥{{value.oldPrice}}</span>
                            </div>
                            <div class="cc_num mui-pull-right">x{{value.num}}双</div>
                        </div>
                        <div class="cart_size">鞋码:{{value.size}}</div>
                    </div>
                </div>
            </div>
        </div>
    </li>

    {{/each}}
</script>


<!-- 编辑的模板 -->
<script type="text/html" id="bj_tl">
    <div class="lt_size_S">
        <!-- sizeArr是一个数组，所有尺码的集合，value是尺码里面的每一个值 -->
        尺码：
            {{ each sizeArr as value }}
            {{if size ==value}}
                <span class="active">{{ value }}</span>
            {{/if}}
            {{if size!=value}}
                 <span >{{ value }}</span>
            {{/if}}
        {{/each}}
                    </div>
        <div class="lt_inventory">
            数量
                        <div class="mui-numbox" data-numbox-min="0" data-numbox-max="{{productNum}}">

                <button class="mui-btn mui-numbox-btn-minus" type="button">-</button>
                <input class="mui-numbox-input"value="{{num}}" type="number" />

                <button class="mui-btn mui-numbox-btn-plus" type="button">+</button>
            </div>
            剩余:20件
        </div>

</script>
<!-- mui的框架 -->
<script src="assets/mui/js/mui.js"></script>
<!-- 相当于jq的，写jq用的,共用的 ，到时还需要引入单个的-->
<script src="assets/zepto/zepto.min.js"></script>
<!-- 公用的js -->
<script src="js/common.js"></script>
<!-- 自己的 -->
<script src="js/cart.js"></script>